package yxy.game.pm2.bean.db.po;

import yxy.apple.db.ResultObjectBuilder;

import java.util.Date;

/**
 * @author ljb
 * @date 2022/10/08 16:21
 **/
public class MatchOnlineRecordPo {
    private String playerCode;
    private String code;//
    private String infoA;// 进攻方
    private String infoB;// 防守方
    private String battleResult;
    private boolean isWin;// 攻方是否胜利
    private Date date;
    private String recordCodes ;// 录像码 jsonarrary
    private int syncdb;
    private long updateTime;//更新时间

    public static ResultObjectBuilder<MatchOnlineRecordPo> builder = rs -> {
        MatchOnlineRecordPo po = new MatchOnlineRecordPo();
        po.setPlayerCode(rs.getString("pCode"));
        po.setCode(rs.getString("code"));
        po.setInfoA(rs.getString("infoA"));
        po.setInfoB(rs.getString("infoB"));
        po.setWin(rs.getBoolean("isWin"));
        po.setBattleResult(rs.getString("battleResult"));
        po.setDate(rs.getDate("date"));
        po.setRecordCodes(rs.getString("recordCodes"));
        po.setSyncdb(rs.getInt("syncdb"));
        po.setUpdateTime(rs.getLong("updateTime"));
        return po;
    };

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public boolean isWin() {
        return isWin;
    }

    public void setWin(boolean win) {
        isWin = win;
    }

    public String getPlayerCode() {
        return playerCode;
    }

    public void setPlayerCode(String playerCode) {
        this.playerCode = playerCode;
    }

    public String getInfoA() {
        return infoA;
    }

    public void setInfoA(String infoA) {
        this.infoA = infoA;
    }

    public String getInfoB() {
        return infoB;
    }

    public void setInfoB(String infoB) {
        this.infoB = infoB;
    }

    public String getBattleResult() {
        return battleResult;
    }

    public void setBattleResult(String battleResult) {
        this.battleResult = battleResult;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }


    public String getRecordCodes() {
        return recordCodes;
    }

    public void setRecordCodes(String recordCodes) {
        this.recordCodes = recordCodes;
    }

    public int getSyncdb() {
        return syncdb;
    }

    public void setSyncdb(int syncdb) {
        this.syncdb = syncdb;
    }

    public long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(long updateTime) {
        this.updateTime = updateTime;
    }
}
